Skip to content

Conversation

@davidorser
Copy link
Contributor

I was getting errors with the default 1.8.19 IDE when trying to compile this example. I looked up wire.begin() on Arduino's documentation page and it returns void (not an int/bool.)

This change would let it compile, but is there a better way to do this? I imagine I'm missing something though. I skimmed the Arduino wire.* methods and didn't see anything that would indicate success in starting the interface.

If this is reasonable, I will expand the final pull request to include all 4 examples.

@sfe-SparkFro sfe-SparkFro marked this pull request as ready for review August 21, 2024 22:53
@sfe-SparkFro
Copy link
Contributor

Thanks for this PR! I ran into the same problem when debugging #7 on a ReadBoard Plus. Some platforms (eg. ESP32) make Wire.begin() return an error code, but that's not true across all platforms, so your solution is the best way to do it for all platforms. Was going to do this myself, but saw this so I'll merge it in after changing the other examples to match 😉

@sfe-SparkFro sfe-SparkFro merged commit ce11d27 into sparkfun:main Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants